<template>
  <div>
    <hr>
    <InjectCom />
    <button @click="reload">刷新页面</button>
  </div>
</template>
<script>
import InjectCom from './components/injectCom'
export default {
  components: {
    InjectCom
  },
  inject: ['reload'],
  provide() {
    return {
      xxx: this.abc,
      fn: this.fn,
      that: this
    }
  },
  data() {
    return {
      abc: '123'
    }
  },
  methods: {
    fn(str) {
      console.log('fn ' + str)
    }
  }
}
</script>
<style></style>
